#pragma once

#ifndef MXPLUGINMANAGER_API
# ifdef WIN32
#  ifdef MXPLUGINMANAGER_EXPORTS
#   define MXPLUGINMANAGER_API __declspec(dllexport)
#  else
#   define MXPLUGINMANAGER_API __declspec(dllimport)
#  endif
# else
#  define MXPLUGINMANAGER_API
# endif
#endif

#include <string>
#include "IMxPluginLibDetails.h"

class MXPLUGINMANAGER_API MxPluginLib
{
	public:
		static const char *const endl;
		static const char *const InvalidStr;
		static const wchar_t *const InvalidwStr;
		static const long Invalid = -1;

	public:
		MxPluginLib(void);
		MxPluginLib(const wchar_t *pathfilename, void *hInstance,
			void *(MXSTDMETHOD *pfn)(const char *));
		~MxPluginLib(void);

		bool IsValid();
		void *CreateClassInstance(const char *IID);
		const char *GetLibID();
		const char *GetLibName();
		const char *GetLibVersion();
		const char *GetLibDetails();
		const char *GetLibSummary();
		const wchar_t *GetwPathFilename();
		const char *GetPathFilename();

		void SetSelection(bool check);
		bool GetSelection();

private:
		IMxPluginLibDetails *_pLibDetails;
		void *_hInstance;
		void *(MXSTDMETHOD *_pfn)(const char *);

		std::wstring _wPathFilename;
		std::string _PathFilename;
		std::string _DetailsStr;
		std::string _SummaryStr;
		bool _Select;
};

